lit = {'grape','dog','elephant','hello','health','lion','morning','88','47'}
ins = input('Please add your word:')
try:
    if ins in lit:
               print('The word had been updated.')
    else:
        raise KeyError                         
except KeyError:
    print('The key not found')                